#ifndef GAMECONTROLLER_H
#define GAMECONTROLLER_H

#include "mainscene.h"
#include "levelscene.h"
#include "gamescene.h"

class GameController
{
public:
    GameController();
    ~GameController();
    //单例
    static GameController *getInstance();

    //
    void initMainScene(MainScene *scene);


    //隐藏与显示
    void showMianScene();
    void hideMianScene();
    void showLevelScene();
    void hideLevelScene();
    void showGameScene(int level = 1);
    void hideGameScene();
    void deletGameScene();

    void setxy(double xx,double yy);
    double getx();
    double gety();
    //播放音乐
    void playStarsSound();
    void playBackSound();
    void playCoinSound();
    void playWinSound();



private:
    static GameController *s_instance;
    MainScene *m_mainScene;
    Levelscene *m_leveScene;
    Gamescene *m_gameScene;

    double x;
    double y;
};

#endif // GAMECONTROLLER_H
